import { SearchFormFieldDefinition, MainAttributeInfoInterface } from "@/views/common/ts/Interface";

export const searchFormConfig: SearchFormFieldDefinition[] = [
  {
    queryAttributeName: 'queryGroupInfoRequest.fuzzyFirstGroupName',
    queryAttributeLabel: '一级组织名称',
    queryEditType: 'text',
    queryAttributePlaceholder: '模糊匹配',
    queryAttributeDefaultValue:'',
    rules: [
  {
    type: 'string',
    max: 20,
    message: '一级组织名称长度不能超过20个字符。'
  }
]
  },
  {
    queryAttributeName: 'queryGroupInfoRequest.fuzzySecondGroupName',
    queryAttributeLabel: '二级组织名称',
    queryEditType: 'text',
    queryAttributePlaceholder: '模糊匹配',
    rules: [
  {
    type: 'string',
    max: 20,
    message: '二级组织名称长度不能超过20个字符。'
  }
]
  },
  {
    queryAttributeName: 'queryAccountInfoRequest.fuzzyUserName',
    queryAttributeLabel: '用户名称',
    queryEditType: 'text',
    queryAttributePlaceholder: '模糊匹配',
    rules: [
  {
    type: 'string',
    max: 255,
    message: '用户名称长度不能超过255个字符。'
  }
]
  },
  {
    queryAttributeName: 'queryAccountInfoRequest.fuzzyMail',
    queryAttributeLabel: '用户的电子邮箱',
    queryEditType: 'text',
    queryAttributePlaceholder: '模糊匹配',
    rules: [
  {
    type: 'string',
    max: 255,
    message: '用户的电子邮箱长度不能超过255个字符。'
  }
]
  },
  {
    queryAttributeName: 'queryAccountInfoRequest.accountNum',
    queryAttributeLabel: '帐户卡数字',
    queryEditType: 'number',
    queryAttributePlaceholder: '只能输入数值,精确匹配。',
  },
  {
    queryAttributeName: 'queryAccountInfoRequest.fuzzyDescription',
    queryAttributeLabel: '用户描述',
    queryEditType: 'text',
    queryAttributePlaceholder: '模糊匹配',
    rules: [
  {
    type: 'string',
    max: 255,
    message: '用户描述长度不能超过255个字符。'
  }
]
  },
  {
    queryAttributeName: 'queryAccountInfoRequest.createTime',
    queryAttributeLabel: '记录创建时间',
    queryEditType: 'datetime-range',
  },
  {
    queryAttributeName: 'queryAccountInfoRequest.updateTime',
    queryAttributeLabel: '记录修改时间',
    queryEditType: 'datetime-range',
    queryAttributeDefaultValue:'2025-11-04 00:00:00,2025-11-04 00:00:00',
  }
];


  export const tableColumnList: MainAttributeInfoInterface[] = [
  {
    attributeName: 'accountInfoDO.accountInfoId',
    attributeLabel: '用户信息唯一标识',
    editType: 'text',
    unInsertable: true,
    unUpdatable: true,
    isDefaultHidden: true,
    extendsAttributeInfo: {}
  },
  {
    attributeName: 'groupInfoDO.groupInfoId',
    attributeLabel: '分组外键',
    editType: 'number',
    rules: [
  {
    required: true,
    message: '分组外键不能为空。'
  }
],
    extendsAttributeInfo: {}
  },
  {
    attributeName: 'groupInfoDO.firstGroupName',
    attributeLabel: '一级组织名称',
    isSortable: true,
    editType: 'text',
    extendsAttributeInfo: {}
  },
  {
    attributeName: 'groupInfoDO.secondGroupName',
    attributeLabel: '二级组织名称',
    editType: 'text',
    extendsAttributeInfo: {}
  },
  {
    attributeName: 'accountInfoDO.userName',
    attributeLabel: '用户名称',
    editType: 'text',
    rules: [
  {
    required: true,
    message: '用户名称不能为空。'
  },
  {
    type: 'string',
    max: 255,
    message: '用户名称长度不能超过255个字符。'
  }
],
    extendsAttributeInfo: {}
  },
  {
    attributeName: 'accountInfoDO.mail',
    attributeLabel: '用户的电子邮箱',
    editType: 'text',
    rules: [
  {
    required: true,
    message: '用户的电子邮箱不能为空。'
  },
  {
    type: 'string',
    max: 255,
    message: '用户的电子邮箱长度不能超过255个字符。'
  }
],
    extendsAttributeInfo: {}
  },
  {
    attributeName: 'accountInfoDO.accountNum',
    attributeLabel: '帐户卡数字',
    editType: 'number',
    rules: [
  {
    required: true,
    message: '帐户卡数字不能为空。'
  }
],
    extendsAttributeInfo: {}
  },
  {
    attributeName: 'accountInfoDO.description',
    attributeLabel: '用户描述',
    editType: 'text',
    rules: [
  {
    type: 'string',
    max: 255,
    message: '用户描述长度不能超过255个字符。'
  }
],
    extendsAttributeInfo: {}
  },
  {
    attributeName: 'accountInfoDO.createTime',
    attributeLabel: '记录创建时间',
    editType: 'text',
    isSortable: true,
    unInsertable: true,
    unUpdatable: true,
    extendsAttributeInfo: {
      columnWidth: 180
    }
  },
  {
    attributeName: 'accountInfoDO.updateTime',
    attributeLabel: '记录修改时间',
    editType: 'text',
    isSortable: true,
    unInsertable: true,
    unUpdatable: true,
    extendsAttributeInfo: {}
  },
  {
    attributeName: 'accountInfoDO.isDelete',
    attributeLabel: '记录是否逻辑删除',
    editType: 'text',
    unInsertable: true,
    unUpdatable: true,
    isDefaultHidden: true,
    extendsAttributeInfo: {}
  }
];



/**
* 后台服务URI配置信息
*/
//export const batchDeleteUri = "/mock/api/domain-address/user-view/batchDeleteUserList";
export const batchDeleteUri = "/web-display-server/user/batchDeleteUserList";
export const fetchListUri = "/web-display-server/user/selectAccountInfoListByQueryAccountInfoAndGroupInfoRequest2";
export const fetchDetailUri = "/web-display-server/user/selectAccountInfoListByQueryAccountInfoAndGroupInfoRequest2";
export const addUri = "/web-display-server/user/saveUser";
export const updateUri = "/web-display-server/user/saveUser";
export const BaseURI = "/web-display-server";
export const BaseExcelUri = BaseURI+"/webDisplayServerExcel";
export const primaryKey = "accountInfoDO.accountInfoId";
export const entityName = "accountInfo";
export const queryRequest = "queryAccountInfoRequest";